package visitor;

/**
 * 名称访问
 **/
public class StringVisitor implements Visitor {

	String s;

	@Override
	public String toString() {
		return s;
	}

	@Override
	public void visit(Gladiolus g) {

		s = "That's Gladiolus";
	}

	@Override
	public void visit(Chrysanthemum c) {

		s = "That's Chrysanthemum";
	}

}
